﻿using System;
using System.Collections.Generic;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace Web_HengliSeed.Sys_Manage
{
    public partial class M_UpdatePassWord : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            ClassFile.Function.CheckState();
        }

        protected void BtnSave_Click(object sender, EventArgs e)
        {
            if (BLL.AdminUser.VateUpdatePass(txtOldPass.Value.Trim(), txtCheckPass.Value.Trim()))
            {
                BLL.SysLog.AddSysLog("【修改密码】" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "｛修改成功｝", 0);
                Common.ShowMessage.Show(Page, "", "密码更新成功,新密码： " + txtCheckPass.Value + " 请牢记...", "M_CompanyInfo.aspx");
            }
            else
            {
                BLL.SysLog.AddSysLog("【修改密码】" + DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss") + "｛修改失败｝", 0);
                Common.ShowMessage.Show(Page, "", "密码更新失败，请重试或联系技术人员...", "M_UpdatePassWord.aspx"); 
            }
        }
    }
}
